package com.fyt.controller;

/**
 * @author ：fyt
 * @date ：2024/02/26 16:09
 */
import com.fyt.service.htmlToPdfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class HtmlToPdfController {
    private static final String runAdd = "D:\\wkhtmltopdf\\bin\\wkhtmltopdf.exe";
    private static final String htmlName = "D:\\desktop\\2024-02\\01.html";
    private static final String pdfName = "D:\\desktop\\2024-02\\aaa.pdf";

    @Autowired
    private htmlToPdfService htmlToPdfService;

    @RequestMapping("/htmlToPdf")
    public void htmlToPdf(){
        htmlToPdfService.htmlToPdf(runAdd,htmlName,pdfName);
    }

}
